import request from '@/utils/request'

//export表示可以被别人调用
export default {

  //后台分页查询banner
  pageBannerCondition(current,limit,bannerQuery) {
    return request({
      url:`/educms/banneradmin/pageBanner/${current}/${limit}`,
      method: 'post',
      //data标识把对象转json传输
      data: bannerQuery
    })
  },
  //添加banner
  save(banner) {
    return request({
      url: `/educms/banneradmin/addBanner`,
      method: 'post',
      data: banner
    })
  },
  //根据id获取Banner
  getBannerById(id) {
    return request({
      url: `/educms/banneradmin/get/${id}`,
      method: 'get'
    })
  },
  //根据id修改Banner
  updateBannerById(banner) {
    return request({
      url: `/educms/banneradmin/updateById`,
      method: 'put',
      data: banner
    })
  },
  //根据id删除Banner
  removeById(id) {
    return request({
      url: `/educms/banneradmin/deleteById/${id}`,
      method: 'delete'
    })
  },

}
